From a0beab8a615a91bbcad120ad4faef4403232208f Mon Sep 17 00:00:00 2001 From: MatmaRex Date: Sat, 11 May 2013 20:40:39 +0200 Subject: [PATCH] Remove the space from between headline and its section edit link I kept it in I6a6c12a9, but really there's no reason for it to be there, as the link is delineated with square brackets and visually with a 1 em padding. It only causes funkiness when copying text. Change-Id: I7bde0e4fd646108f9319d5d5d00e7ea49fee9252 --- includes/Linker.php | 2 +- tests/parser/parserTests.txt | 202 +++++++++++++++++------------------ 2 files changed, 102 insertions(+), 102 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index 4003efb30b..3529d28b50 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1740,7 +1740,7 @@ class Linker { */ public static function makeHeadline( $level, $attribs, $anchor, $html, $link, $legacyAnchor = false ) { $ret = "$html " + . "$html" . $link . ""; if ( $legacyAnchor !== false ) { diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 24dbc97045..f90b27980d 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -4938,7 +4938,7 @@ List interrupted by empty line or heading -

A heading [edit]

+

A heading[edit]

@@ -6018,8 +6018,8 @@ Bug 6563: Edit link generation for section shown by !! input {{includeonly section}} !! result -

Includeonly section [edit]

-

Section T-1 [edit]

+

Includeonly section[edit]

+

Section T-1[edit]

!! end @@ -6045,7 +6045,7 @@ Bug 6563: Edit link generation for section suppressed by ==Section 1== !! result -

Section 1 [edit]

+

Section 1[edit]

!! end @@ -8135,13 +8135,13 @@ More ===Smaller headline=== Blah blah !! result -

Headline 1 [edit]

+

Headline 1[edit]

Some text

-

Headline 2 [edit]

+

Headline 2[edit]

More

-

Smaller headline [edit]

+

Smaller headline[edit]

Blah blah

!! end @@ -8180,14 +8180,14 @@ Some text -

Headline 1 [edit]

-

Subheadline 1 [edit]

-
Skipping a level [edit]
-
Skipping a level [edit]
-

Headline 2 [edit]

+

Headline 1[edit]

+

Subheadline 1[edit]

+
Skipping a level[edit]
+
Skipping a level[edit]
+

Headline 2[edit]

Some text

-

Another headline [edit]

+

Another headline[edit]

!! end @@ -8235,16 +8235,16 @@ Handling of sections up to level 6 and beyond -

Level 1 Heading [edit]

-

Level 2 Heading [edit]

-

Level 3 Heading [edit]

-

Level 4 Heading [edit]

-
Level 5 Heading [edit]
-
Level 6 Heading [edit]
-
= Level 7 Heading= [edit]
-
== Level 8 Heading== [edit]
-
=== Level 9 Heading=== [edit]
-
==== Level 10 Heading==== [edit]
+

Level 1 Heading[edit]

+

Level 2 Heading[edit]

+

Level 3 Heading[edit]

+

Level 4 Heading[edit]

+
Level 5 Heading[edit]
+
Level 6 Heading[edit]
+
= Level 7 Heading=[edit]
+
== Level 8 Heading==[edit]
+
=== Level 9 Heading===[edit]
+
==== Level 10 Heading====[edit]
!! end @@ -8277,12 +8277,12 @@ TOC regression (bug 9764) -

title 1 [edit]

-

title 1.1 [edit]

-

title 1.1.1 [edit]

-

title 1.2 [edit]

-

title 2 [edit]

-

title 2.1 [edit]

+

title 1[edit]

+

title 1.1[edit]

+

title 1.1.1[edit]

+

title 1.2[edit]

+

title 2[edit]

+

title 2.1[edit]

!! end @@ -8313,12 +8313,12 @@ wgMaxTocLevel=3 -

title 1 [edit]

-

title 1.1 [edit]

-

title 1.1.1 [edit]

-

title 1.2 [edit]

-

title 2 [edit]

-

title 2.1 [edit]

+

title 1[edit]

+

title 1.1[edit]

+

title 1.1.1[edit]

+

title 1.2[edit]

+

title 2[edit]

+

title 2.1[edit]

!! end @@ -8343,11 +8343,11 @@ wgMaxTocLevel=3
  • 2 Section 2
  • -

    Section 1 [edit]

    -

    Section 1.1 [edit]

    -

    Section 1.1.1 [edit]

    -

    Section 1.1.1.1 [edit]

    -

    Section 2 [edit]

    +

    Section 1[edit]

    +

    Section 1.1[edit]

    +

    Section 1.1.1[edit]

    +

    Section 1.1.1.1[edit]

    +

    Section 2[edit]

    !! end @@ -8358,8 +8358,8 @@ Resolving duplicate section names == Foo bar == == Foo bar == !! result -

    Foo bar [edit]

    -

    Foo bar [edit]

    +

    Foo bar[edit]

    +

    Foo bar[edit]

    !! end @@ -8369,8 +8369,8 @@ Resolving duplicate section names with differing case (bug 10721) == Foo bar == == Foo Bar == !! result -

    Foo bar [edit]

    -

    Foo Bar [edit]

    +

    Foo bar[edit]

    +

    Foo Bar[edit]

    !! end @@ -8389,10 +8389,10 @@ __NOTOC__ {{sections}} ==Section 4== !! result -

    Section 0 [edit]

    -

    Section 1 [edit]

    -

    Section 2 [edit]

    -

    Section 4 [edit]

    +

    Section 0[edit]

    +

    Section 1[edit]

    +

    Section 2[edit]

    +

    Section 4[edit]

    !! end @@ -8403,8 +8403,8 @@ __NOEDITSECTION__ ==Section 1== ==Section 2== !! result -

    Section 1

    -

    Section 2

    +

    Section 1

    +

    Section 2

    !! end @@ -8413,7 +8413,7 @@ Link inside a section heading !! input ==Section with a [[Main Page|link]] in it== !! result -

    Section with a link in it [edit]

    +

    Section with a link in it[edit]

    !! end @@ -8435,9 +8435,9 @@ __TOC__
  • 2 title 2
  • -

    title 1 [edit]

    -

    title 1.1 [edit]

    -

    title 2 [edit]

    +

    title 1[edit]

    +

    title 1.1[edit]

    +

    title 2[edit]

    !! end @@ -8459,10 +8459,10 @@ The line above must have a trailing space! --> But just in case it doesn't... !! result -

    = [edit]

    +

    =[edit]

    The line above must have a trailing space!

    -

    = [edit]

    +

    =[edit]

    But just in case it doesn't...

    !! end @@ -8498,19 +8498,19 @@ section 5
  • 5 text " text
  • -

    text > text [edit]

    +

    text > text[edit]

    section 1

    -

    text < text [edit]

    +

    text < text[edit]

    section 2

    -

    text & text [edit]

    +

    text & text[edit]

    section 3

    -

    text ' text [edit]

    +

    text ' text[edit]

    section 4

    -

    text " text [edit]

    +

    text " text[edit]

    section 5

    !! end @@ -8532,10 +8532,10 @@ Headers with excess '=' characters
  • 4 =italic heading
  • -

    foo= [edit]

    -

    =foo [edit]

    -

    italic heading= [edit]

    -

    =italic heading [edit]

    +

    foo=[edit]

    +

    =foo[edit]

    +

    italic heading=[edit]

    +

    =italic heading[edit]

    !! end @@ -8569,12 +8569,12 @@ __NOEDITSECTION__ -

    Header 1

    -

    Header 1.1

    -

    Header 1.2

    -

    Header 2

    -

    Header 2.1

    -

    Header 2.2

    +

    Header 1

    +

    Header 1.1

    +

    Header 1.2

    +

    Header 2

    +

    Header 2.1

    +

    Header 2.2

    !! end @@ -9861,7 +9861,7 @@ Fuzz testing: Parser14 == onmouseover= == http://__TOC__ !! result -

    onmouseover= [edit]

    +

    onmouseover=[edit]

    http://

    Contents

    • 1 onmouseover=
    • @@ -9876,7 +9876,7 @@ Fuzz testing: Parser14-table ==a== {| STYLE=__TOC__ !! result -

      a [edit]

      +

      a[edit]

      @@ -11673,7 +11673,7 @@ Inclusion of !userCanEdit() content !! input {{MediaWiki:Fake}} !! result -

      header [edit]

      +

      header[edit]

      !! end @@ -11704,12 +11704,12 @@ Out-of-order TOC heading levels
    -

    2 [edit]

    -
    6 [edit]
    -

    3 [edit]

    -

    1 [edit]

    -
    5 [edit]
    -

    2 [edit]

    +

    2[edit]

    +
    6[edit]
    +

    3[edit]

    +

    1[edit]

    +
    5[edit]
    +

    2[edit]

    !! end @@ -11816,7 +11816,7 @@ anchorencode encodes like the TOC generator: (bug 18431) {{anchorencode: _ +:.3A%3A&&]] }} __NOEDITSECTION__ !! result -

    _ +:.3A%3A&&]]

    +

    _ +:.3A%3A&&]]

    .2B:.3A.253A.26.26.5D.5D

    !! end @@ -12067,7 +12067,7 @@ language=sr variant=sr-ec !! input == -{Naslov}- == !! result -

    Naslov [уреди]

    +

    Naslov[уреди]

    !! end @@ -12408,7 +12408,7 @@ Morwen/13: Unclosed link followed by heading !! result

    [[link

    -

    heading [edit]

    +

    heading[edit]

    !! end @@ -12420,7 +12420,7 @@ HHP2.1: Heuristics for headings in preprocessor parenthetical structures !! result

    {{foo|

    -

    heading

    +

    heading

    !! end @@ -12432,7 +12432,7 @@ HHP2.2: Heuristics for headings in preprocessor parenthetical structures !! result

    {{foo|

    -

    heading [edit]

    +

    heading[edit]

    !! end @@ -13252,7 +13252,7 @@ __TOC__
  • 1 Lost episodes
  • -

    Lost episodes [edit]

    +

    Lost episodes[edit]

    !! end @@ -13269,7 +13269,7 @@ __TOC__
  • 1 should be bold then normal text
  • -

    should be bold then normal text [edit]

    +

    should be bold then normal text[edit]

    !! end @@ -13286,7 +13286,7 @@ __TOC__
  • 1 Image
  • -

    Image Foobar.jpg [edit]

    +

    Image Foobar.jpg[edit]

    !! end @@ -13303,7 +13303,7 @@ __TOC__
  • 1 Quote
  • -

    Quote
    [edit]

    +

    Quote
    [edit]

    !! end @@ -13322,7 +13322,7 @@ QED
  • 1 Proof: 2 < 3
  • -

    Proof: 2 < 3 [edit]

    +

    Proof: 2 < 3[edit]

    Hanc marginis exiguitas non caperet. QED

    @@ -13342,8 +13342,8 @@ __TOC__
  • 2 Foo Bar
  • -

    Foo Bar [edit]

    -

    Foo
    Bar
    [edit]

    +

    Foo Bar[edit]

    +

    Foo
    Bar
    [edit]

    !! end @@ -13361,8 +13361,8 @@ __TOC__
  • 2 b">Evilbye
  • -

    Hello [edit]

    -

    b">Evilbye [edit]

    +

    Hello[edit]

    +

    b">Evilbye[edit]

    !! end @@ -13389,11 +13389,11 @@ __TOC__
  • 5 Attributes after dir on these span tags must be deleted from the TOC
  • -

    C++ [edit]

    -

    זבנג! [edit]

    -

    The attributes on these span tags must be deleted from the TOC [edit]

    -

    All attributes on these span tags must be deleted from the TOC [edit]

    -

    Attributes after dir on these span tags must be deleted from the TOC [edit]

    +

    C++[edit]

    +

    זבנג![edit]

    +

    The attributes on these span tags must be deleted from the TOC[edit]

    +

    All attributes on these span tags must be deleted from the TOC[edit]

    +

    Attributes after dir on these span tags must be deleted from the TOC[edit]

    !! end @@ -13410,7 +13410,7 @@ title=[[Main Page]] !! input {{int:Bug32057}} !! result -

    Headline text [edit]

    +

    Headline text[edit]

    !! end @@ -13512,7 +13512,7 @@ nowiki inside link inside heading (bug 18295) !! input ==[[foo|xyz]]== !! result -

    xyz [edit]

    +

    xyz[edit]

    !! end -- 2.20.1